package com.nulldev.util.web.HttpServer3.extensions.flexiProxy;

import java.util.Map;

import com.nulldev.util.web.HttpClient.HttpRequest;
import com.nulldev.util.web.HttpServer3.Response;

public interface FlexiProxyHandler {

	public static enum FlexiProxyHandlerType {
		TYPE_NONE,
		TYPE_RESPONSE_OVERRIDER,
		TYPE_REQUEST_OVERRIDER
	}

	public default Response overrideResponse(final String url, final Map<String, String> headers) {
		return null;
	}

	public default HttpRequest<?> overrideRequest(final HttpRequest<?> original, final String url, final Map<String, String> headers) {
		return original;
	}

	public default FlexiProxyHandlerType type() {
		return FlexiProxyHandlerType.TYPE_NONE;
	}
}
